package com.coderush.admin.sys.model.dto;

import com.alibaba.fastjson2.JSON;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * PackageName com.coderush.admin.sys.model.dto
 *
 * @Author Eason
 * @Version v1.0
 * @ClassName JobUpdateDto
 * @Date 2025/8/27
 * @Description TODO
 */
@Data
public class JobUpdateDto {

    @Schema(description = "职位ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "职位ID不能为空")
    private Long id;

    /**
     * 职位名称
     */
    @Schema(description = "职位名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "职位名称不能为空")
    private String jobName;

    /**
     * 职位描述，包括职责、要求等
     */
    private String description;

    /**
     * 状态：1-启用，0-停用
     */
    @Schema(description = "职位状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = {"1", "0"}, example = "1-启用，0-停用")
    @NotNull(message = "职位状态不能为空")
    private Integer jobStatus;

    public static void main(String[] args) {

        JobUpdateDto jobUpdateDto = new JobUpdateDto();
        jobUpdateDto.setId(1L);
        jobUpdateDto.setJobName("123");
        jobUpdateDto.setDescription("123");
        jobUpdateDto.setJobStatus(0);

        System.out.println(JSON.toJSONString(jobUpdateDto));

    }

}